physics_particle_set_group_flags

Set the group type flags for a group of particles.

语法:

physics_particle_set_group_flags(group, flags)


参数 描述
group The particle group to set.
flags The flags to set on the particle.


返回: N/A(无返回值)


描述

With this function you can change the group flags for a group of particles. The group value is that which was returned when you created the group of particles using the function physics_particle_group_end, while the flags are the return value of a combination of the following constants:

常量 描述
phy_particle_group_flag_solid A solid particle group prevents other fixtures from lodging inside of it. Should anything penetrate it, the solid particle group pushes the offending fixture back out to its surface, making a a solid particle group possess an especially strong repulsive force.
phy_particle_group_flag_rigid Rigid particle groups are ones whose shape does not change, even when they collide with other fixtures.



These group flags use bit-masking to create a final output value that is then checked to set the different basic properties of the group, apart from those set by the particle flags. You can use none, one or both of these constants by using the bitwise or "|" to mask the appropriate bits (as shown in the example below).


例如:

var flags = phy_particle_group_flag_solid | phy_particle_group_flag_rigid;
physics_particle_set_group_flags(group, flags);

The above code will create a variable to store the flags value and then use it to set the flags of all particles created in the group indexed by the variable "group".


上一页: Soft Body Particles
下一页: physics_particle_get_group_flags
© Copyright YoYo Games Ltd. 2018 All Rights Reserved